load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
    name = "helloworld_proto",
    srcs = ["helloworld.proto"],
    visibility = ["//visibility:public"],
    deps = [
        "@com_google_protobuf//:wrappers_proto",
        "@go_googleapis//google/api:annotations_proto",
    ],
)

go_proto_library(
    name = "helloworld_go_proto",
    compilers = ["@io_bazel_rules_go//proto:go_grpc"],
    importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/internal/helloworld",
    proto = ":helloworld_proto",
    visibility = ["//visibility:public"],
    deps = ["@go_googleapis//google/api:annotations_go_proto"],
)

go_library(
    name = "go_default_library",
    srcs = ["helloworld.pb.gw.go"],
    embed = [":helloworld_go_proto"],
    importpath = "github.com/grpc-ecosystem/grpc-gateway/examples/internal/helloworld",
    visibility = ["//visibility:public"],
    deps = [
        "//runtime:go_default_library",
        "//utilities:go_default_library",
        "@com_github_golang_protobuf//descriptor:go_default_library_gen",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@org_golang_google_grpc//:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
        "@org_golang_google_grpc//grpclog:go_default_library",
        "@org_golang_google_grpc//status:go_default_library",
    ],
)
